
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Strain &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="plot" href="atomman.plot.html" />
    <link rel="prev" title="SDVPN" href="atomman.defect.SDVPN.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.plot.html" title="plot"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.SDVPN.html" title="SDVPN"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" accesskey="U">defect</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="strain">
<h1>Strain<a class="headerlink" href="#strain" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="atomman.defect.Strain">
<em class="property">class </em><code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">Strain</code><a class="headerlink" href="#atomman.defect.Strain" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<dl class="method">
<dt id="atomman.defect.Strain.G">
<em class="property">property </em><code class="sig-name descname">G</code><a class="headerlink" href="#atomman.defect.Strain.G" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom lattice correspondence tensor</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.angularvelocity">
<em class="property">property </em><code class="sig-name descname">angularvelocity</code><a class="headerlink" href="#atomman.defect.Strain.angularvelocity" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom angular velocity</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.asdict">
<code class="sig-name descname">asdict</code><a class="headerlink" href="#atomman.defect.Strain.asdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary containing the computed per-atom strain properties.
This corresponds to the results from the old nye_tensor function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>properties</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – One or more properties.  If not given, will include strain,
invariant1, invariant2, invariant3, angularvelocity and nye.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Containing each of the computed properties.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.9)">dict</a></p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.build_p_vectors">
<code class="sig-name descname">build_p_vectors</code><a class="headerlink" href="#atomman.defect.Strain.build_p_vectors" title="Permalink to this definition">¶</a></dt>
<dd><p>Builds the p vectors for each atom based on a reference system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>basesystem</strong> (<em>atomman.system</em>) – The base/reference system to use.  This should be a defect-free
perfect crystal system with atom ids directly corresponding to atoms
in any system that you want to analyze with the Nye tensor.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list associated with system to use.  Either neighbors
or cutoff must be given, or system must have a neighbors attribute.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – Cutoff distance for computing a neighbor list for system.  Either
neighbors or cutoff must be given, or system have a neighbors
attribute.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.clear_properties">
<code class="sig-name descname">clear_properties</code><a class="headerlink" href="#atomman.defect.Strain.clear_properties" title="Permalink to this definition">¶</a></dt>
<dd><p>Clears all computed properties. Allows for the values to be recomputed
using different settings.</p>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.invariant1">
<em class="property">property </em><code class="sig-name descname">invariant1</code><a class="headerlink" href="#atomman.defect.Strain.invariant1" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom first strain invariant</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.invariant2">
<em class="property">property </em><code class="sig-name descname">invariant2</code><a class="headerlink" href="#atomman.defect.Strain.invariant2" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom second strain invariant</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.invariant3">
<em class="property">property </em><code class="sig-name descname">invariant3</code><a class="headerlink" href="#atomman.defect.Strain.invariant3" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom third strain invariant</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.neighbors">
<em class="property">property </em><code class="sig-name descname">neighbors</code><a class="headerlink" href="#atomman.defect.Strain.neighbors" title="Permalink to this definition">¶</a></dt>
<dd><p>The list of neighbors for system.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList">atomman.NeighborList</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.nye">
<em class="property">property </em><code class="sig-name descname">nye</code><a class="headerlink" href="#atomman.defect.Strain.nye" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom Nye tensor</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.p_vectors">
<em class="property">property </em><code class="sig-name descname">p_vectors</code><a class="headerlink" href="#atomman.defect.Strain.p_vectors" title="Permalink to this definition">¶</a></dt>
<dd><p>The per-atom sets of ideal atom positions.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.rotation">
<em class="property">property </em><code class="sig-name descname">rotation</code><a class="headerlink" href="#atomman.defect.Strain.rotation" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom rotation tensor</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.save_to_system">
<code class="sig-name descname">save_to_system</code><a class="headerlink" href="#atomman.defect.Strain.save_to_system" title="Permalink to this definition">¶</a></dt>
<dd><p>Saves the computed per-atom strain properties to the given system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>properties</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – One or more properties.  If not given, will include strain,
invariant1, invariant2, invariant3, angularvelocity and nye.</p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.set_p_vectors">
<code class="sig-name descname">set_p_vectors</code><a class="headerlink" href="#atomman.defect.Strain.set_p_vectors" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the p vectors for each atom according to a single p vector set to use
for all atoms or a list of p vector sets defined for each atom individually.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>p_vectors</strong> (<em>array-like object</em>) – List(s) of radial distance vectors between each atom and its nearest
neighbors in a perfect crystal setting.  If one list of p_vectors is
given, then it is applied to all atoms.</p></li>
<li><p><strong>axes</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – 3x3 array of right-handed orthogonal axes.  If given, will be used to
transform the p_vectors before computing the Nye tensor.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.solve_G">
<code class="sig-name descname">solve_G</code><a class="headerlink" href="#atomman.defect.Strain.solve_G" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the lattice correspondence tensor, G, by comparing all neighbor
vectors q in the current system to ideal reference neighbor vectors p.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>theta_max</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Allows for the theta_max value set during the class initialization
to be changed.  The maximum theta angle in degrees to use when
searching for matches between p vectors and q vectors.  Optimum
values are dependent on the crystal structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="atomman.defect.Strain.solve_nye">
<code class="sig-name descname">solve_nye</code><a class="headerlink" href="#atomman.defect.Strain.solve_nye" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the Nye tensor based on the lattice correspondence tensor G
and the current atomic positions.</p>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.strain">
<em class="property">property </em><code class="sig-name descname">strain</code><a class="headerlink" href="#atomman.defect.Strain.strain" title="Permalink to this definition">¶</a></dt>
<dd><p>The computed per-atom strain tensor</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.system">
<em class="property">property </em><code class="sig-name descname">system</code><a class="headerlink" href="#atomman.defect.Strain.system" title="Permalink to this definition">¶</a></dt>
<dd><p>The system the properties are being computed for.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.defect.Strain.theta_max">
<em class="property">property </em><code class="sig-name descname">theta_max</code><a class="headerlink" href="#atomman.defect.Strain.theta_max" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum angle in degrees to include in the p-q vector pairings.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)">float</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="atomman.defect.SDVPN.html"
                        title="previous chapter">SDVPN</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="atomman.plot.html"
                        title="next chapter">plot</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.plot.html" title="plot"
             >next</a> |</li>
        <li class="right" >
          <a href="atomman.defect.SDVPN.html" title="SDVPN"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="atomman.defect.html" >defect</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>